package org.wattdepot.cli.commands;

import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import javax.xml.datatype.XMLGregorianCalendar;
import org.junit.Test;

/**
 * Tests the ValidateDay class.
 * @author Jarret Mizo, Shaun Ramento
 *
 */
public class TestValidateDay {
  /**
   * Test the validateDay() method.
   * 
   * @throws Exception if there is a problem
   */
  @Test
  public void testValidateDay() throws Exception {
    ValidateDay user = new ValidateDay();
    XMLGregorianCalendar valid = user.validateDay("2009-10-30");
    XMLGregorianCalendar invalid = user.validateDay("today");
    assertTrue("Checking vaild input", valid.isValid());
    assertNull("Check invalid input", invalid);
  }

}
